home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
OS2
/
ELV15.ARJ
/
CTAGS.DOC
< prev
next >
Wrap
Text File
|
1992-06-20
|
4KB
|
133 lines
CTAGS(1) UNIX Programmer's Manual CTAGS(1)
NNNNAAAAMMMMEEEE
ctags - Generates "tags" and (optionally) "refs" files
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ccccttttaaaaggggssss [----ssssttttvvvvrrrraaaa] _f_i_l_e_s_n_a_m_e_s...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_c_t_a_g_s generates the "tags" and "refs" files from a group of
C source files. The "tags" file is used by Elvis' ":tag"
command, control-] command, and -t option. The "refs" file
is sometimes used by the _r_e_f(_1) program.
Each C source file is scanned for #define statements and
global function definitions. The name of the macro or func-
tion becomes the name of a tag. For each tag, a line is
added to the "tags" file which contains:
- the name of the tag
- a tab character
- the name of the file containing the tag
- a tab character
- a way to find the particular line within the file.
The filenames list will typically be the names of all C
source files in the current directory, like this:
$ ctags -stv *.[ch]
OOOOPPPPTTTTIIIIOOOONNNNSSSS
----tttt Include typedefs. A tag will be generated for each
user-defined type. Also tags will be generated for
struct and enum names. Types are considered to be glo-
bal if they are defined in a header file, and static if
they are defined in a C source file.
----vvvv Include variable declarations. A tag will be generated
for each variable, except for those that are declared
inside the body of a function.
----ssss Include static tags. _C_t_a_g_s will normally put global
tags in the "tags" file, and silently ignore the static
tags. This flag causes both global and static tags to
be added. The name of a static tag is generated by
prefixing the name of the declared item with the name
of the file where it is defined, with a colon in
between. For example, "static foo(){}" in "bar.c"
results in a tag named "bar.c:foo".
----rrrr This causes _c_t_a_g_s to generate both "tags" and "refs".
Without ----rrrr, it would only generate "tags".
----aaaa Append to "tags", and maybe "refs". Normally, _c_t_a_g_s
overwrites these files each time it is invoked. This
flag is useful when you have to many files in the
Printed 6/13/92 1
CTAGS(1) UNIX Programmer's Manual CTAGS(1)
current directory for you to list them on a single
command-line; it allows you to split the arguments
among several invocations.
FFFFIIIILLLLEEEESSSS
tags A cross-reference that lists each tag name, the name of
the source file that contains it, and a way to locate a
particular line in the source file.
refs The "refs" file contains the definitions for each tag
in the "tags" file, and very little else. This file
can be useful, for example, when licensing restrictions
prevent you from making the source code to the standard
C library readable by everybody, but you still every-
body to know what arguments the library functions need.
BBBBUUUUGGGGSSSS
_c_t_a_g_s is sensitive to indenting and line breaks. Conse-
quently, it might not discover all of the tags in a file
that is formatted in an unusual way.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
elvis(1), refs(1)
AAAAUUUUTTTTHHHHOOOORRRR
Steve Kirkendall
kirkenda@cs.pdx.edu
Printed 6/13/92 2